import request from '@/utils/request'

export function login(data) {
  return request.post('/sys/login', data)
}

export function getInfo(token) {
  return request.post('sys/profile')
}

export function getUserDetailById(id) {
  return request.get(`sys/user/${id}`)
}

/**
 * @description: 保存员工信息
 * @param {*} data
 * @return {*}
 */
export function saveUserDetailById(data) {
  return request({
    url: `/sys/user/${data.id}`,
    method: 'put', // 全量修改
    data
  })
}
